<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <ui:composition >
        <h:panelGrid styleClass="panel_menu"  >
            <a4j:form id="menuForm" >
                <rich:toolBar height="50" >
                    <rich:dropDownMenu >
                        <f:facet name="label">
                            <h:panelGroup>
                                <h:outputText value="Manutenção"/>
                            </h:panelGroup>
                        </f:facet>
                        <rich:menuItem   value="Usuário" action="#{usuarioBean.novoUsuario}" />
                        <rich:menuSeparator/>
                        <rich:menuItem   value="Categoria" action="#{categoriaBean.novaCategoria}" />
                        <rich:menuItem 	 value="Ítens de Categoria" action="#{itemCategoriaBean.novoItemCategoria}" />
                        <rich:menuSeparator/>
                        <rich:menuItem 	 value="Fórmulas" action="#{formulaBean.novaFormula}"/>                      
                        <rich:menuItem   value="Conta" action="#{contaBean.novaConta}"/>
                    </rich:dropDownMenu>                  

                   
                    <rich:dropDownMenu >
                        <f:facet name="label">
                            <h:panelGroup>
                                <h:outputText value="Relatórios"/>
                            </h:panelGroup>
                        </f:facet>
                        <rich:menuItem value="Despesas" action="#{relatorioBean.gerarRelDespesa}"/>
                        <rich:menuItem value="Entradas" action="#{relatorioBean.gerarRelEntrada}"/>
                    </rich:dropDownMenu>


                    <rich:toolBarGroup location="right" rendered="#{(not empty sessao.usuario)}">
                        <h:graphicImage url="/imagens/user.png" />
                        <h:outputText  value="#{sessao.usuario.nomeCompleto}" />
                    </rich:toolBarGroup>

                    <rich:toolBarGroup location="right" >
                        <h:graphicImage url="/imagens/door_in.png" />
                        <h:commandLink action="#{sessao.logoff}"
                                       value="Sair"
                                       accesskey="s"/>
                    </rich:toolBarGroup>
                </rich:toolBar>
            </a4j:form >
        </h:panelGrid>
    </ui:composition>
</html>
